package com.threeonemeeting;

import com.snda.lib.http.HttpUtil;

/**
 * 
 * @author zhangzhongqing 常用的一些常量
 */
public class Const {
	public static final int PAGE_NUM = 10; // 每页的数目
	public static final String VERSION = "0.9.1";
	public static final String Tag = "ThreeOne";

	public static final int TOOLBAR_HEIGHT = 45; // 单位为dip，在实际使用的时候必须转为pix
	public static final int BUTTON_HEIGHT = 40; // 图片按钮的宽度高度

	// ===========================================================
	// StartActivity Request Code相关的错误码
	// ===========================================================
	public static final class RequestCode {
		private RequestCode() {
		}

		public static final int IMAGEPICK_REQUEST_CODE = 0;
		public static final int CAMERA_REQUEST_CODE = 1;
		public static final int SHAREFROMSD_REQUEST_CODE = 2;
	}

	// ===========================================================
	// 应用相关的错误码
	// ===========================================================
	public static final class Keys {
		private Keys() {
		}

		public static final String KEY_LIST = "list";
		public static final String KEY_PAGE = "page";
	}

	// ===========================================================
	// 应用相关的错误码
	// ===========================================================
	public static final class AppError {
		private AppError() {
		}

		public static final int ERROR_LOGIN = HttpUtil.ERROR_APP_ERROR_START + 1; // 应用自定义错误开始
		public static final int ERROR_REGISTER = HttpUtil.ERROR_APP_ERROR_START + 2; // 应用自定义错误开始
		public static final int ERROR_ENROLL = HttpUtil.ERROR_APP_ERROR_START + 3;
	}

	// ===========================================================
	// URL
	// ===========================================================
	public static final class URL {
		private URL() {
		}

		public static final String BASE_SERVER_URL = "http://www.31huiyi.com/";
		public static final String BASE_THUMB_URL = "http://file.31huiyi.com/FileThumbHandler.ashx?width=90&height=67&file=";
		public static final String BASE_BANNER_THUMB_URL = "http://file.31huiyi.com/FileThumbHandler.ashx?width=240&height=120&file=";
		public static final String BASE_HEADERIMG_URL = "http://file.31huiyi.com/UserFaceHandler.ashx?uid=";
	}

	// ===========================================================
	// Time 相关的时间定义
	// ===========================================================
	public static final class Times {
		private Times() {
		}

		public static final int SECOND = 1000; // 一秒的时间
		public static final int MINUTE = 60 * SECOND; // 一分钟
		public static final int HOUR = 60 * MINUTE; // 一小时
		public static final int DAY = 24 * HOUR; // 一天

	}

	// ===========================================================
	// 广播事件
	// ===========================================================
	public static final class Broadcast {
		private Broadcast() {
		}

		public static final String ACTION_CHANGE_TAB = "com.threeone.changeTab";
		public static final String ACTION_CHANGE_SUBTAB = "com.threeone.changeSubTab";

		public static final String CURRENT_TAB_INDEX = "com.threeone.maintab.cur_tab_index";
		public static final String CURRENT_SUBTAB_INDEX = "com.threeone.maintab.cur_subtab_index";
	}

	// ===========================================================
	// 保存在Preference里的键值
	// ===========================================================
	public static final class Pref {
		private Pref() {
		}

		public static final String PREFS_NAME = "PrefsFile";

		public static final String PREFS_KEY_NOTIFY = "notify";
		public static final String PREFS_KEY_IMAGE_QUALITY = "quality";
		public static final String PREFS_KEY_MAIN_USER_ID = "mainid";
		public static final String PREFS_KEY_CURRENT_USER_ID = "userid";
	}

	// ===========================================================
	// 搜索会议的时候的搜索范围
	// ===========================================================
	public static final class Search {
		private Search() {
		}

		public final static int SEARCH_ALL = 0;
		public final static int SEARCH_INWEEK = 1;
		public final static int SEARCH_WEEKEND = 2;
		public final static int SEARCH_MONTH = 3;
	}

	// ===========================================================
	// 报名的时候需要的系统字段
	// ===========================================================
	public static final class Enroll {
		private Enroll() {
		}

		public final static String RealName = "RealName";
		public final static String Sex = "Sex";
		public final static String Age = "Age";
		public final static String Email = "Email";
		public final static String Phone = "Phone";
		public final static String Mobile = "Mobile";
		public final static String MSN = "MSN";
		public final static String QQ = "QQ";
		public final static String City = "City";
		public final static String Company = "Company";
		public final static String Address = "Address";
		public final static String Zipcode = "Zipcode";
		public final static String Department = "Department";
		public final static String PosStatus = "PosStatus";
		public final static String Memo = "Memo";
		public final static String Industries = "Industries";
		public final static String BuyCount = "BuyCount";
		public final static String Fax = "Fax";
	}

}
